package edu.ahut.designpattern.chainresponsibility.app;

import java.math.BigInteger;
import java.util.Scanner;

public class RequirementDemo {
    public static void main(String[] args) {
        Scanner cin=new Scanner(System.in);
        int n=cin.nextInt();
        if(n<=12) {
            BigInteger product = BigInteger.ONE;
            for (int i = 2; i <= n; i++) {
                product = product.multiply(new BigInteger(Integer.toString(i)));
            }
            System.out.println(product);
        }else if(n<=20){


        }else{



        }
    }
}
/**
 * 1. 可扩展性
 * 2 1-12 Integer
 * 3 13-20 Long
 * 4 n>20 BigInteger
 */

/**
 * 1. FactorialHandler  <= IntegerXXX  LongHandler  BigIntegerHandler
 * 2. 构建一个处理机的链条chain
 */